//
// Created by lwj12 on 24-8-21.
//

#ifndef STACK_QUEUE_STACK_H
#define STACK_QUEUE_STACK_H
#include <deque>
#include <vector>
#include <list>
using namespace std;
namespace lwj
{
    template<class T, class Con = deque<T>>
    class stack
    {
    public:
        T& top() {return _c.back();}
        const T& top() const {return _c.back();}
        void pop() {_c.pop_back();}
        void push(const T& val) {_c.push_back(val);}
        size_t size() const {return _c.size();}
        bool empty() const {return _c.empty();}
    private:
        Con _c;
    };
}
#endif//STACK_QUEUE_STACK_H
